using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InteractableSetDialouge:MonoBehaviour {

	public DialougeClip dialougeDefault;
	public string[] itemToDialouge;
	public DialougeClip[] dialougeByItem;

	void OnInteraction() {
		int dialougeIndex = -1;

		for(int i = 0;i<itemToDialouge.Length;i++) {
			if(PlayerController.instance.IsHolding(itemToDialouge[i])) {
				dialougeIndex=i;
			}
		}

		if(dialougeIndex<0) VNController.instance.EnterDialouge(dialougeDefault);
		else VNController.instance.EnterDialouge(dialougeByItem[dialougeIndex]);
	}

}
